<template>
  姓名：<input ref="name" abc="aaaaa" /> <button @click="showRes">分析输⼊框</button>
</template>
<script setup lang="ts">
import { ref } from 'vue';
let name = ref()
function showRes() {
  console.log(name) //RefImpl ref对象
  console.log(name.value) //<input> dom元素
  console.log(name.value.value) //输⼊框的值
  console.log(name.value.getAttribute("abc")) //⾃定义属性的值
}
</script>
<style scoped></style>
